package com.ruoyi.distributionConfig.domain;

import java.math.BigDecimal;

import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 分销全局配置对象 wdmd_distribution_config
 * 
 * @author ruoyi
 * @date 2025-10-11
 */
@Data
public class DistributionConfig extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 配置ID */
    private Long configId;

    /** 分销开关：0-关闭 1-开启 */
    @Excel(name = "分销开关：0-关闭 1-开启")
    private String distributionOpen;

    /** 最大分销层级(1-3) */
    @Excel(name = "最大分销层级(1-3)")
    private String maxLevel;

    /** 自购返佣开关：0-关闭 1-开启 */
    @Excel(name = "自购返佣开关：0-关闭 1-开启")
    private String selfCommissionSwitch;

    /** 一级返佣开关：0-关闭 1-开启 */
    @Excel(name = "一级返佣开关：0-关闭 1-开启")
    private String dealCommissionSwitch;

    /** 二级返佣开关：0-关闭 1-开启 */
    @Excel(name = "二级返佣开关：0-关闭 1-开启")
    private String secondCommissionSwitch;

    /** 返佣结算周期(天) */
    @Excel(name = "返佣结算周期(天)")
    private Long settlementDays;

    /** 分销申请协议 */
    @Excel(name = "分销申请协议")
    private String applyProtocol;

    /** 最低提现金额 */
    @Excel(name = "最低提现金额")
    private BigDecimal minWithdrawAmount;

    /** 佣金税率百分比 */
    @Excel(name = "佣金税率百分比")
    private BigDecimal taxRate;

    /** 订单退款功能开关：0-关闭 1-开启 */
    @Excel(name = "订单退款功能开关：0-关闭 1-开启")
    private String refundSwitch;

    /** 状态（0=上架 1=下架） */
    @Excel(name = "状态", readConverterExp = "0==上架,1==下架")
    private String status;

    /** 删除标志（0存在 2删除） */
    private String delFlag;

    /** 版本号（乐观锁） */
    @Excel(name = "版本号", readConverterExp = "乐=观锁")
    private Long version;

//    /** 邀请链接 */
//    @Excel(name = "邀请链接")
//    private String inviteUrl;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("configId", getConfigId())
            .append("distributionOpen", getDistributionOpen())
            .append("maxLevel", getMaxLevel())
            .append("selfCommissionSwitch", getSelfCommissionSwitch())
            .append("dealCommissionSwitch", getDealCommissionSwitch())
            .append("secondCommissionSwitch", getSecondCommissionSwitch())
            .append("settlementDays", getSettlementDays())
            .append("applyProtocol", getApplyProtocol())
            .append("minWithdrawAmount", getMinWithdrawAmount())
            .append("taxRate", getTaxRate())
            .append("status", getStatus())
            .append("delFlag", getDelFlag())
            .append("version", getVersion())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("createBy", getCreateBy())
            .append("updateBy", getUpdateBy())
            .append("remark", getRemark())
            .toString();
    }
}
